[RV64_DYNAREC] Support VMOVDQU opcode - #4224
Conversation
ksco
left a comment
There was a problem hiding this comment.
Is there any specific reason to add the unaligned path?
I added that because |
|
No, all CPU are targeted to be supported. I think the question was more about: was this (unaligned) case needed, and is this (unaligned) branch tested? |
Sorry, I’m still confused and would appreciate some clarification. My understanding of the I notice that an unaligned‑path exists for All risc-v CPUs I have available support unaligned access. So I changed |
|
Yes, your understanding of the IF_UNALIGNED macro is correct (also, the block is forced as dirty so it will be regenerated at next run) The process is: IF_UNALIGNED are always implemented in a "as-needed" process. You have a repeated SIGBUS that would benefit from IF_UNALIGNED, you implement it. Else, no need to clutter the code with IF_UNALIGNED cases. All you hardware support unaligned access? You mean unaligned access to hardware mapped memory, like GPU memory? because the unaligned stuffs is for this case: unaligned access to memory mapped GPU memory (like on AMD gpu for example). |
Can I understand it this way?
When I mentioned my cpus supporting unaligned accesses earlier, I was only considering normal cacheable memory. This does not cover device memory, atomic‑region memory, and other such memory types. |
Yes. The unaligned path is an optimisation. Too many SIGBUS will hurt the performances badly. But if there is no SIGBUS, why clutering the code with useless branch... |
It seems Box64 has made quite a few trade‑offs. I have removed the unaligned‑path. Please help review again. Thanks. |
The VMOVDQU instruction is used by WeMeet for accelerating image processing. I test this pr by https://github.com/zengdage/x86_64-inst-test/blob/main/avx256/test_vmovdqu256.c